<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>一键挪车管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
		});
	</script>
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content">
	<div class="ibox">
	<div class="ibox-title">
		<h5>一键挪车列表 </h5>
	</div>
    <div class="ibox-content">
	<sys:message content="${message}"/>
	
	<!--查询条件-->
	<div class="row">
	<div class="col-sm-12">
	<form:form id="searchForm" modelAttribute="carMove" action="${ctx}/it/carMove/" method="post" class="form-inline">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/><!-- 支持排序 -->
		<div class="form-group">
			<span>车牌：</span>
				<form:input path="chepai" htmlEscape="false" maxlength="32"  class=" form-control input-sm"/>
			<span>手机号：</span>
				<form:input path="mobile" htmlEscape="false" maxlength="11"  class=" form-control input-sm"/>
			<span>状态</span>
				<form:input path="status" htmlEscape="false" maxlength="1"  class=" form-control input-sm"/>
			<span>会员：</span>
				<form:input path="memberId" htmlEscape="false" maxlength="32"  class=" form-control input-sm"/>
			<div class="pull-right">
				<button  class="btn btn-primary btn-sm " onclick="search()" ><i class="fa fa-search"></i> 查询</button>
			</div>
		 </div>	
	</form:form>
	<br/>
	</div>
	</div>
	
	<!-- 工具栏 -->
	<div class="row">
	<div class="col-sm-12">
		<div class="pull-left">
			
			<shiro:hasPermission name="it:carMove:export">
	       		<table:exportExcel url="${ctx}/it/carMove/export"></table:exportExcel><!-- 导出按钮 -->
	       	</shiro:hasPermission>
	       <button class="btn btn-white btn-sm " data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
		
			</div>
		
	</div>
	</div>
	
	<!-- 表格 -->
	<table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable">
		<thead>
			<tr>
				<th  class="sort-column createDate">时间</th>
				<th  class="sort-column chepai">车牌号</th>
				<th  class="sort-column chepai">车牌归属</th>
				<th  class="sort-column address">违停地点</th>
				<th  class="sort-column mobile">车主手机</th>
				<th  class="sort-column mobile">短信提醒</th>
				<th  class="sort-column mobile">车主回应</th>
				<th  class="sort-column mobile">十分钟免罚</th>
				<th  class="sort-column carImg">挡车照片</th>
				<th  class="sort-column mobile">举报人电话</th>
				<th  class="sort-column status">状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="carMove">
			<tr>
				<td>
					<fmt:formatDate value="${carMove.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
				<td>
					${carMove.chepai}
				</td>
				<td>
				</td>
				<td>
					${carMove.address}
				</td>
				<td>
					${carMove.mobile}
				</td>
				<td>
				</td>
				<td>
				</td>
				<td>
				</td>
				<td>
					<img src="${carMove.carImg}" width="120px">
				</td>
				<td>
					${carMove.mobile}
				</td>
				<td>
				  <c:if test="${carMove.status eq 1 }"><span class="text-info">系统受理</span></c:if>
				  <c:if test="${carMove.status eq 2 }"><span class="text-warning">车主回应</span></c:if>
				   <c:if test="${carMove.status eq 3 }"><span class="text-success">用户确认已挪车</span></c:if>
				   <c:if test="${carMove.status eq 4 }"><span class="text-danger">系统超时，车主已回应</span></c:if>
				   <c:if test="${carMove.status eq 5 }"><span class="text-danger">系统超时，车主未回应</span></c:if>
				   <c:if test="${carMove.status eq 6 }"><span class="text-danger">系统超时，车主已回应，用户举报违停后</span></c:if>
				   <c:if test="${carMove.status eq 7 }"><span class="text-danger">系统超时，车主未回应，用户举报违停（挪车失败）</span></c:if>
				   <c:if test="${carMove.status eq 8 }"><span class="text-danger">交管部门拖车后，由拖车人确认违停车辆已拖走</span></c:if>
				</td>
				
				
				<td>
					<shiro:hasPermission name="it:carMove:edit">
    					<a href="#" onclick="openDialog('修改状态', '${ctx}/it/carMove/form?id=${carMove.id}','500px', '200px')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改状态</a>
    				</shiro:hasPermission>
    				<shiro:hasPermission name="it:carMove:del">
						<a href="${ctx}/it/carMove/delete?id=${carMove.id}" onclick="return confirmx('确认要删除该一键挪车吗？', this.href)"   class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a>
					</shiro:hasPermission>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	
		<!-- 分页代码 -->
	<table:page page="${page}"></table:page>
	<br/>
	<br/>
	</div>
	</div>
</div>
</body>
</html>